<?php
$tourbest = db_get_list_post_in_post_type_nopage_metakey(2, 'tour', 'date', 'DESC', $wpdb->prefix.'tour_best', 'display');
query_posts($tourbest);
if(have_posts())
{
?>
	<ul>
	<?php
	$image_rs = new SimpleImage();
	while (have_posts())
	{
		the_post();
		$postID = get_the_ID();
		$title = get_the_title($postID);
		$perlink = get_permalink($postID);
		$alt = db_vietnamese_slug($title);
		$thumbnail = db_get_post_meta($postID, $wpdb->prefix.'thumbnail');
		if($thumbnail)
			$thumbnail = db_resizeImage($image_rs, $thumbnail, 115, 94);
		?>
		<li>
            <div class="box-img">
              <img alt="<?php echo $alt;?>" src="<?php echo $thumbnail;?>" />
            </div>
            <div class="info">
              <a href="<?php echo $perlink;?>" title="<?php echo $title;?>"><?php echo db_shortDesc($title, 30);?></a>
              <p>
                <?php echo db_shortDesc(get_the_content(), 80);?>
              </p>
            </div>
         </li>
		<?php 
	}
	wp_reset_query(); 
	unset($image_rs);
	?>
	</ul>
<?php 	
} 
else 
{
	echo '<ul><li>No Post!</li></ul>';
}
?>									